package com.example.paymentsystem.template.impl;

import com.example.paymentsystem.common.PaymentRequest;
import com.example.paymentsystem.common.PaymentResponse;
import com.example.paymentsystem.strategy.PaymentContext;
import com.example.paymentsystem.template.AbstractPaymentTemplate;

/**
 * @author YiYuan
 * @data 2025/6/25
 * @apoNote
 */
public class OrderValidationPaymentTemplate extends AbstractPaymentTemplate {

    private PaymentContext paymentContext;

    @Override
    protected PaymentResponse doPay(PaymentRequest request) {
        System.out.println("Order validation template: Executing actual payment via strategy...");
        return paymentContext.executePayment(request);
    }
}
